#include <51func.h>
int main(int argc, char *argv[])
{
    int fds[2];
    // pipe(fds[2]) fds[2] 以下标2访问元素
    pipe(fds); 
    // fds[0] 读端
    // fds[1] 写端
    printf("fds[0] = %d, fds[1] = %d\n", fds[0], fds[1]);
    write(fds[1],"howareyou",9);
    char buf[4096] = {0};
    read(fds[0],buf,sizeof(buf));
    printf("buf = %s\n", buf);
    return 0;
}

